import { defineStore } from 'pinia'
import { ref } from 'vue'

// enum ClockType {
//   CLOCK = 'clock',
//   TIMEING = 'timing'
// }

export const useConfigStore = defineStore(
  'config',
  () => {
    const config = ref({
      clock: {
        type: 'clock' as 'clock' | 'timing',
        timing: {
          hour: 0,
          minute: 8,
          second: 10
        },
        bgColor: '#fff',
        color: '#000'
      },
      footer: {
        content: '晚上八点直播，求关注！',
        bgColor: '#8e44ad',
        color: '#fff'
      }
    })

    return { config }
  },
  { persist: true }
)
